# -*- coding: utf-8 -*-

"""
@Datetime: 2019/5/21
@Author: Zhang Yafei
"""


def record_log(funcName):
    def inner(*args, **kwargs):
        print("---记录日志------")
        ret = funcName(*args, **kwargs)
        return ret

    return inner


@record_log
def func():
    print("---func----")
    return "haha"


@record_log
def func2():
    print("----func2---")


@record_log
def func3(a):
    print(f"----func3--a={a}--")


ret = func()
print(f"func return value is {ret}")

ret2 = func2()
print(f"func2 return value is {ret2}")

func3(11)

"""
---记录日志------
---func----
func return value is haha
---记录日志------
----func2---
func2 return value is None
---记录日志------
----func3--a=11--
"""